package com.boarsoft.flow.core.bean;

public abstract class BaseNode {
	public static final int STATUS_NORMAL = 0;
	public static final int STATUS_DISABLED = 1;

	// public static final int TYPE_ARROW = 0;
	public static final int TYPE_SUBFLOW = 1;
	public static final int TYPE_PROCESS = 2;
	public static final int TYPE_JUDGE = 3;
	public static final int TYPE_START = 4;
	public static final int TYPE_END = 5;
	public static final int TYPE_INPUT = 6;
	public static final int TYPE_SWITCH = 7;
	public static final int TYPE_OUTPUT = 8;
	public static final int TYPE_TRY = 9;
	public static final int TYPE_CATCH = 10;
	public static final int TYPE_FINALLY = 11;
	public static final int TYPE_YRT = 12;
	public static final int TYPE_BEGIN_TX = 13;
	public static final int TYPE_COMMIT_TX = 14;
	public static final int TYPE_FORK = 15;
	public static final int TYPE_JOIN = 16;
	public static final int TYPE_SUSPEND = 17;
	public static final int TYPE_ROLLBACK_TX = 18;

	protected String id;
	protected int type = -1;
	protected int status = STATUS_NORMAL;
	protected String revCode;
	/** 节点中文名 */
	protected String name;

	public String toString() {
		return id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public abstract int getType();

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getRevCode() {
		return revCode;
	}

	public void setRevCode(String revCode) {
		this.revCode = revCode;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
